#include "CalendarButton.h"
#include "CalendarPanel.h"

CalendarButton::CalendarButton(String title, CalendarPanel* panel, int id) :
	ActionButton(title)
{
	polarity = (title == T("+"));
	this->panel = panel;
	this->id = id;
}

void CalendarButton::mouseUp(const MouseEvent& e)
{
	if(polarity)
		panel->addToDay(id);
	else
		panel->subtractFromDay(id);

	state.mouseDown = false;
	repaint();
}

void CalendarButton::paintMore(Graphics& g)
{
}
